package com.caopeng.javaee.dao;

import com.caopeng.javaee.entity.teacher;
import org.hibernate.validator.constraints.EAN;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.io.Serializable;
import java.util.List;

@Repository
public interface TeacherJpa extends JpaRepository<teacher,Integer>, JpaSpecificationExecutor<teacher>, Serializable {
    List<teacher> findByAccountAndPassword(String account,String password);
    teacher findByAccount(String account);
    teacher findByAccountAndPhone(String account,String phone);
    teacher findById(int id);
    teacher findByName(String name);
}
